package net.dodo.robot;

import java.awt.Toolkit;

/**
 * 
 * @author yanping
 * 
 */
class Screen {

	private int screenWidth;

	private int screenHeight;

	public void setScreenWidth(int screenWidth) {
		this.screenWidth = screenWidth;
	}

	public void setScreenHeight(int screenHeight) {
		this.screenHeight = screenHeight;
	}

	public int getScreenWidth() {
		setScreenWidth((int) Toolkit.getDefaultToolkit().getScreenSize().width);
		return screenWidth;
	}

	public int getScreenHeight() {
		setScreenHeight((int) Toolkit.getDefaultToolkit().getScreenSize().height);
		return screenHeight;
	}

	public int getHalfScreenWidth() {
		setScreenHeight(((int) Toolkit.getDefaultToolkit().getScreenSize().width) / 2);
		return screenWidth;
	}

	public int getHalfScreenHeight() {
		setScreenHeight(((int) Toolkit.getDefaultToolkit().getScreenSize().height) / 2);
		return screenHeight;
	}
}
